<?php

namespace App\Models;

use App\Traits\HasDateTimeFormatter;
use App\Traits\Ownable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class LoanApplicationLog extends Model
{
    use HasFactory, HasDateTimeFormatter, Ownable;

    protected $table = "loan_application_log";

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function loan()
    {
        return $this->belongsTo(LoanApplication::class, 'loan_id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user() {
        return $this->belongsTo(User::class, 'user_id');
    }
}
